package com.gombe.credit.app.configs

import com.gombe.credit.app.utils.shared.GombeCreditSharedHelper
import com.gombe.credit.app.utils.shared.GombeCreditSharedKey

/**
 * Configs
 * @Author wwdeng
 * @CreateTime: 2024/12/5 10:59
 * @Annotation：APP 配置
 */
object GombeCreditConfigs {

    /**
     * APP 名称
     */
    const val GOMBECREDIT_APPNAME = "GOMBECREDIT"

    /**
     * 包名
     */
    const val GOMBECREDIT_PACKAGENANME = "com.gombecredit.fastloan.secureapp"

    /**
     * 隐私协议（塞内）
     */
    const val GOMBECREDIT_PRIVACY_POLICY_SENEGAL_LINK = "https://sites.google.com/zoeinfotech.online/gombe-credit"

    /**
     * Adjust
     */
    const val GOMBECREDIT_ADJ_TOKEN = "3elrdn668xkw"

    /**
     * 获取加解密Key
     */
    fun takeGombeCreditSecretKey(): String{
        return GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_SECRET_KEY)
    }

    /**
     * 获取加解密IV
     */
    fun takeGombeCreditSecretIv(): String{
        return GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_SECRET_IV)
    }

    /**
     * 是否是法语地区
     *  desc：地区转发（timeZone） 以 fcfa、xaf、senegal、benin 结尾，则定义为法语地区
     */
    fun isGombeCreditFrench(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("fcfa") || timeZone.endsWith("xaf") || timeZone.endsWith("senegal") || timeZone.endsWith("benin")
    }

    /**
     * 加纳 233
     */
    fun isGombeCreditCashGha(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("gha")
    }

    /**
     * 肯尼亚 254
     */
    fun isGombeCreditKsh(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("ksh")
    }

    /**
     * 乌干达 256
     */
    fun isGombeCreditUgx(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("ugx")
    }

    /**
     * 科特迪瓦 225
     */
    fun isGombeCreditFcfa(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("fcfa")
    }

    /**
     * 喀麦隆  237
     */
    fun isGombeCreditXaf(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("xaf")
    }

    /**
     * 赞比亚 	260
     */
    fun isGombeCreditZmb(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("zmb")
    }

    /**
     * 塞内加尔  221
     */
    fun isGombeCreditSenegal(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("senegal")
    }

    /**
     * 坦桑尼亚  255
     */
    fun isGombeCreditTanz(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("tanz")
    }

    /**
     * 贝宁  229
     */
    fun issGombeCreditBenin(): Boolean{
        val timeZone = GombeCreditSharedHelper.takeGombeCreditSharedString(GombeCreditSharedKey.GOMBECREDIT_TIMEZONE)
        return timeZone.endsWith("benin")
    }

    /**
     * 是否是斯瓦西里语
     */
    fun isGombeCreditSwahili(): Boolean{
//        if (isGombeCreditTanz()) {
//            val curtLocale = Languages.getAppLanguage(MyApps.app.getAppContext())
//            when (curtLocale.language) {
//                LocaleContract.getSwahiliLocale().language -> {//坦桑
//                    return true
//                }
//            }
//        }
        return false
    }

}